import { Body, Inject, Post, Provide } from '@midwayjs/decorator';
import { CoolController, BaseController } from '@cool-midway/core';
import { BusinessProductAListEntity } from '../../../../entity/product/a_list';
import { BusinessProductAListService } from '../../../../service/product/a_list';


/**
 * 用户
 */
@Provide()
@CoolController({
  api: ['info'],
  entity: BusinessProductAListEntity,
  service: BusinessProductAListService,
})
export class BusinessAppProductAListController extends BaseController {
  @Inject()
  businessProductAListService: BusinessProductAListService;

  /**
   * 获取分页数据
   * { page: 1, size: 20, sort: 'desc', order: 'createTime' }
   */
  @Post('/page', { summary: '获取分页数据' })
  async getPageByUser(@Body() body) {
    const result = await this.businessProductAListService.getPageByUser(body)
    return this.ok(result);
  }
}
